﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Tools.Maptools.Editor
{
#if UNITY_EDITOR
    // 道路编辑器 生成的道路路点脚本
    public class SandBoxRoadPoint : MonoBehaviour
    {
        SandBoxRoadInfo parent;
        int idx = 0;
        public bool bRemove = true;
        public Vector3 start_pos;
        public void InitPoint(SandBoxRoadInfo parent, int idx)
        {
            this.parent = parent;
            this.idx = idx;
        }

        private void OnDestroy()
        {
            if (bRemove)
            {
                parent.RemovePoint(idx);
            }
        }
    }
#endif
}